cd "~/Replication/"

use "./data/mainplot.dta", replace

/* Figure 5 */
* With Legend
twoway scatter est_std_Method cor1 if study == "Study 2", ylab(-.2(.15).8, nogrid) xlab(-.2(.15).8, nogrid) aspect(1) ytitle("Correlation using CFA and Method Factor") xtitle("Correlation using Observed Index") mcol(sky) msymbol(th) || function y=x, range(-.2 .8) lcol(gs10) lpattern(longdash) || lowess est_std_Method cor1, lpattern(shortdash) || scatter est_std_Method cor1 if study == "Study 3", mcol(orangebrown) msymbol(dh) || scatter est_std_Method cor1 if study == "Study 4", mcol(turquoise) msymbol(sh) legend(order(1 "Study 2 (Dynata)" 4 "Study 3 (MTurk)" 5 "Study 4 (Bovitz)")) yline(0) xline(0) name("full", replace)
* Without Legend
twoway scatter est_std_Method cor1 if study == "Study 2", legend(off) ylab(-.2(.15).8, nogrid) xlab(-.2(.15).8, nogrid) aspect(1) ytitle("Correlation using CFA and Method Factor") xtitle("Correlation using Observed Index") mcol(sky) msymbol(th) || function y=x, range(-.2 .8) lcol(gs10) lpattern(longdash) || lowess est_std_Method cor1, lpattern(shortdash) || scatter est_std_Method cor1 if study == "Study 3", mcol(orangebrown) msymbol(dh) || scatter est_std_Method cor1 if study == "Study 4", mcol(turquoise) msymbol(sh) legend(order(1 "Study 2 (Dynata)" 4 "Study 3 (MTurk)" 5 "Study 4 (Bovitz)")) yline(0) xline(0) name("full2", replace)

/* Figure 6 */
* With Legend
twoway scatter est_std_Method cor1 if study == "Study 2", by(alignrev, note("")) ylab(-.2(.15).8, nogrid) xlab(-.2(.15).8, nogrid) aspect(1) ytitle("Correlation using CFA and Method Factor") xtitle("Correlation using Observed Index") mcol(sky) msymbol(th) || function y=x, range(-.2 .8) lcol(gs10) lpattern(longdash) || lowess est_std_Method cor1, by(alignrev, note("")) lpattern(shortdash) || scatter est_std_Method cor1 if study == "Study 3", by(alignrev, note("")) mcol(orangebrown) msymbol(dh) || scatter est_std_Method cor1 if study == "Study 4", by(alignrev, note("")) mcol(turquoise) msymbol(sh) legend(order(1 "Study 2 (Dynata)" 4 "Study 3 (MTurk)" 5 "Study 4 (Bovitz)")) yline(0) xline(0) name("alignment", replace)
* Without Legend
twoway scatter est_std_Method cor1 if study == "Study 2", by(alignrev, note("") legend(off)) ylab(-.2(.15).8, nogrid) xlab(-.2(.15).8, nogrid) aspect(1) ytitle("Correlation using CFA and Method Factor") xtitle("Correlation using Observed Index") mcol(sky) msymbol(th) || function y=x, range(-.2 .8) lcol(gs10) lpattern(longdash) || lowess est_std_Method cor1, by(alignrev, note("")) lpattern(shortdash) || scatter est_std_Method cor1 if study == "Study 3", by(alignrev, note("")) mcol(orangebrown) msymbol(dh) || scatter est_std_Method cor1 if study == "Study 4", by(alignrev, note("")) mcol(turquoise) msymbol(sh) yline(0) xline(0) name("alignment2", replace)

